package com.wpml;

import org.springframework.beans.factory.support.DefaultListableBeanFactory;
import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * @Description
 * @Date 2021-05-10
 * @Author wangpei
 **/
public class MyClassPathXmlApplicationContext extends ClassPathXmlApplicationContext {

    public MyClassPathXmlApplicationContext(String...configLocations) {
        super(configLocations);
    }

    @Override
    protected void initPropertySources() {
        System.out.println("...initPropertySources...");
        getEnvironment().setRequiredProperties("username");
    }

    @Override
    protected void customizeBeanFactory(DefaultListableBeanFactory beanFactory) {
        System.out.println("...customizeBeanFactory...");
    }
}
